package org.aeon.gamechatnest.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 89342
 * @description 针对表【role_channel(角色在不同频道的权限表)】的数据库操作Mapper
 * @createDate 2024-05-11 12:11:56
 * @Entity org.aeon.gamechatnest.pojo.RoleChannel
 */
@Mapper
public interface RoleChannelMapper {

    /**
     * 通过角色id查询频道的id
     *
     * @param roleId
     * @return
     */
    List<Long> getIdByRoleId(@Param("roleId") Long roleId);

    /**
     * 通过角色id查询频道的id
     * 批量
     *
     * @param roleIds
     * @return
     */
    List<Long> getIdByRoleIds(@Param("roleIds") List<Long> roleIds);

    /**
     * 删除在频道非默认权限角色权限
     *
     * @param roleChannelIds
     * @return
     */
    int batchDelete(@Param("roleChannelIds") List<Long> roleChannelIds);

}




